﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed

#pragma once

#include "ISurface.h"

namespace gcmp
{
    class IArc2d;
    class Coordinate3d;

    /// \brief 圆柱（弧）面
    ///
    /// 可以是斜圆柱（弧）面
    class ICylinder : public ISurface
    {
        DEFINE_CAST_DERIVED(gcmp::ICylinder, gcmp::ISurface);

    public:
        /// \brief  创建圆柱面（垂直拉伸，拉伸方向X轴与Y轴叉乘得到的Z轴方向）
       /// \param coordinate     坐标系
       /// \param rangeV         V向参数域
       /// \param pIArc2d        二维圆弧曲线
       /// \return  柱面
        GCMP_GEOMETRY_INTERFACE_EXPORT static OwnerPtr<ICylinder> Create(
            const Coordinate3d& coordinate,
            const Intervald &rangeV,
            const IArc2d* pIArc2d
        );


    public:

        /// \brief  设置圆柱面坐标系
       /// \param coordinate  坐标系
        /// \return 成功返回true,否则返回false(默认返回True)
        virtual bool SetCoordinate(const Coordinate3d& coordinate) = 0;

        /// \brief  获取圆柱面坐标系
        /// \return  坐标系
        virtual Coordinate3d GetCoordinate()const = 0;

        /// \brief  设置V参数域
       /// \param intervalV V参数域
        /// \return 成功返回true,否则返回false(默认返回True)
        virtual bool SetLimitV(const Intervald &intervalV) = 0;

        /// \brief  返回二维圆弧
        /// \return  二维圆弧
        virtual OwnerPtr<IArc2d> GetArc2d()const = 0;

        /// \brief  获取圆柱面的半径
        /// \return 半径
        virtual double GetRadius() const = 0;

    public:
        virtual ~ICylinder() {}
    };
}
